/**
 * Copyright (C) 2012 The SkyTvOS Project
 * <p/>
 * Version     Date           Author
 * ─────────────────────────────────────
 * 2014年12月29日         luwei
 */

package com.coocaa.launcher.sidebar.setting;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;

import com.coocaa.launcher.framework.sidebar.ContainerLayout;
import com.coocaa.launcher.framework.sidebar.ItemContainer;
import com.coocaa.launcher.framework.sidebar.item.ItemFactory.ITEM;
import com.coocaa.launcher.sidebar.SettingData;

public class SettingContainer extends ItemContainer {

    private SettingContainerLayout mContainerLayout = null;

    public SettingContainer(Context context, String type) {
        super(context, type);
    }

    @Override
    public ContainerLayout createLayout() {
        mContainerLayout = new SettingContainerLayout(mContext);
        return mContainerLayout;
    }

    @Override
    public List<SettingData> getSettingDatas() {
        if (mParseredSetting != null) {
            if (mType.equals(ITEM.SETTING.toString())) {
                return mParseredSetting.getDeskSettings();
            } else if (mType.equals(ITEM.SYS_SETTING.toString())) {
                return mParseredSetting.getSysSettings();
            }
        }
        return new ArrayList<SettingData>();
    }
}
